#pragma once

#include "GameState.h"

class GameGalaxy : public FSMCartridge
{
private:
	WINAPP*  m_app;
	WINFPS*  m_fps;
	WINTIME* m_time;
	D3DF*    m_d3d;
	DINF*    m_din;

	gData* m_sysData;

	Physic_World m_world;

	DEffect   m_effect;
	clkCamera m_camera;

	gPlayer        m_player;
	List<gObject*> m_quads;

	clkMesh m_grid;
	clkMesh m_circ;
	clkMesh m_back[4];

	gBar    m_energy;
	gSlider m_shield;
	gSlider m_weapon;
	gSlider m_boost;
	gSlider m_hyper;
	clkTexture m_gui;
	clkTexture m_guiInfo;
	clkTexture m_guiLog;
	clkTexture m_guiWeapons;
public:
	GameGalaxy(){}
	GameGalaxy(
		WINAPP*  a_app,
		WINFPS*  a_fps,
		WINTIME* a_time,
		D3DF*    a_d3d,
		DINF*    a_din,
		bool     a_renew = true);

	void init();
	void reset();
	void release();

	void input();
	void update();
	void draw();

	void pre();
	void post();

	void guiUpdate();
	void playerUpdate();
	void collisionUpdate();
};